//
//  DHCategoryCollectionViewCell.m
//  Dresshere
//
//  Created by ZhangPeng on 2017/12/26.
//  Copyright © 2017年 张朋. All rights reserved.
//

#import "DHCategoryCollectionViewCell.h"
#import "DHCategoryModel.h"

@interface DHCategoryCollectionViewCell()

@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *desLabel;
@property (weak, nonatomic) IBOutlet UIImageView *selectedImageView;

@end

@implementation DHCategoryCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)uploadCellWith:(DHCategoryModel *)categoryModel{
    [self.iconImageView dh_setImageURLString:categoryModel.icon];
    self.titleLabel.text = categoryModel.title;
    self.desLabel.text = categoryModel._description;
    if (categoryModel.isSelected) {
        [self.selectedImageView setImage:[UIImage imageNamed:@"home_selected"]];
    }else{
        [self.selectedImageView setImage:nil];
    }
}

@end
